const getters = {
  token: state => state.user.token,
  email: state => state.user.email,
  userId: state => state.user.userId,
  userName: state => state.user.userName,
  lang: state => state.lang.lang,
  collectionTypeId: state => state.collection.typeId,
  userInfo: state => {
    return {
      email: state.user.email,
      userId: state.user.Id,
      userName: state.user.userName,
      sex: state.user.sex,
      mobile: state.user.mobile,
      wechat: state.user.wechat,
      code: state.user.code,
      age: state.user.age,
      job: state.user.job,
      qq: state.user.qq,
      avatar: state.user.avatar,
      codeType: state.user.codeType,
      microBlog: state.user.microBlog
    };
  },
  siteMap: state => {
    let local = state.router.localRoutes;
    let remote = state.router.remoteRoutes.filter(item => {
      return item.title != "首页";
    });
    local.splice(2, 0, ...remote);
    return local;
  },
  specExhibDetail: state => state.specExhib.specExhibDetail,
  wechatLogin: state => state.wechatLogin
};
export default getters;
